package com.yc.c118s3plyqnzf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lcx
 * @since 2022-11-28
 */
@TableName("qnzf_users")
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "ID", type = IdType.AUTO)
      private Integer id;

      @TableField("nickname")
      @NotEmpty(message = "请求输入昵称")
    private String name;

      @NotEmpty(message = "请求输入密码")
      @Length(min = 3, max = 16, message = "密码长度必须是3~16个字符")
    private String password;

      @TableField("phone")
    private String telephone;

      @NotEmpty(message = "请求输入用户名")
      @Length(min = 2, max = 20, message = "用户名长度必须是2~20个字符")
    private String username;

    private String isadmin;
    
    public Integer getId() {
        return id;
    }

      public void setId(Integer id) {
          this.id = id;
      }
    
    public String getName() {
        return name;
    }

      public void setName(String name) {
          this.name = name;
      }
    
    public String getPassword() {
        return password;
    }

      public void setPassword(String password) {
          this.password = password;
      }
    
    public String getTelephone() {
        return telephone;
    }

      public void setTelephone(String telephone) {
          this.telephone = telephone;
      }
    
    public String getUsername() {
        return username;
    }

      public void setUsername(String username) {
          this.username = username;
      }
    
    public String getIsadmin() {
        return isadmin;
    }

      public void setIsadmin(String isadmin) {
          this.isadmin = isadmin;
      }

    @Override
    public String toString() {
        return "Users{" +
              "id = " + id +
                  ", name = " + name +
                  ", password = " + password +
                  ", telephone = " + telephone +
                  ", username = " + username +
                  ", isadmin = " + isadmin +
              "}";
    }
}
